package com.uzai.console.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uzai.console.dto.profit.inviterewardrule.InviteRewardRuleQuery;
import com.uzai.console.entity.InviteRewardRule;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;

@Repository
public interface InviteRewardRuleMapper {
    int deleteById(@Param("id") Long id, @Param("merId") Long merId);

    int insert(InviteRewardRule record);

    int insertSelective(InviteRewardRule record);

    InviteRewardRule selectById(@Param("id") Long id, @Param("merId") Long merId);

    InviteRewardRule selectByNameAndMerId(@Param("name") String name, @Param("merId") Long merId);

    int updateSelective(InviteRewardRule record);

    int update(InviteRewardRule record);

    /**
     * 分页查询
     * @param page
     * @param query
     * @return
     */
    ArrayList<InviteRewardRule> findByList(Page<InviteRewardRule> page, @Param("query") InviteRewardRuleQuery query);

    /**
     * 查询所有
     * @param query
     * @return
     */
    ArrayList<InviteRewardRule> findByList(@Param("query") InviteRewardRuleQuery query);
}